<?php 
if(!isset($_SESSION)) 
{ 
session_start(); 
} 
include '../operations/connection.php';

if ($_REQUEST['newlang'] == "EN") {
	include "../value/value_en.php";
} else if($_REQUEST['newlang'] == "VN") {
	include "../value/value_vn.php";
}
else {
	include "../value/value_kr.php";
}

if(!isset($_SESSION['user']))
	{
		header( 'Location: login.php' );
	}
	else 
	{		
		$username = $_SESSION['fullname'];
		$id_employee = $_SESSION['IDEmployee'];
	}

$selectprimemo = mysql_query("SELECT IDMemo,Title,DATE_FORMAT(CreatedDate,'%Y-%m-%d') as CreatedDate FROM list_memo WHERE IDEmployee ='$id_employee'");
?>
<div id="board-content">
			<span class="caption-board" ><?php echo $l_menu_privatememo?></span>
			<center>
				<img src="images/line1.png" width="100%" /><br /> <br /> <br /> <br />
			</center>
			
			<div class="navigation-button"><a href="#" onclick="onclickAddNewPrivate(this);">
			
				<img src="images/new.png" /></a><div><?php echo $l_addnew?></div>
			</div>
				<br style="clear:both" /><br />
				<table width="100%" style="border: 1px dotted silver;">
					<tr>
						<th width="5%"  style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;"><?php echo $l_no?></th>
						<th width="60%" style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;"><?php echo $l_title?></th>
						<th width="17%" style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;"><?php echo $l_created_date?></th>
						<th width="18%" style="border-bottom:  1px dotted silver;"></th>
						
					</tr>
					
					<?php $i = 0; 
					 while ($row=mysql_fetch_array($selectprimemo)){
					  $i++ ;
					  $idmemo = $row[IDMemo];?>
					<tr>
					<td  style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;"><?php echo $i?></td>
					<td style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;">
						<a href="#" onclick="processPreviewPri('<?=$idmemo?>',this);"><?php echo $row[Title]?></a></td>
					<td style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;"><?php echo $row[CreatedDate]?></td>
					<td style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;text-align: center;">
							<a id="preview" href="#" title="<?php echo $l_preview?>"
								onclick="processPreviewPri('<?=$idmemo?>',this);"> 
								<img src="images/view.png" /> </a>
							<a id="preview" style="margin: 14px;" href="#" title="<?php echo $l_edit?>"
								onclick="onclickEditPrivateMemo('<?=$idmemo?>','edit',this);">
								<img src="images/edit-admin.png" /> </a>
							<a id="preview" href="#"  title="<?php echo $l_delete?>"
								onclick="if(confirm('<?php echo $l_confirm_deleteproject?>')){ processDeletePri('<?=$idmemo?>','<?=$id_employee?>',this); return true;}else{return false;}">
								<img src="images/delete-admin.png" /> </a>
					</td>
					</tr>
					<?php }?>
				</table>
			
		</div>